import yagmail
import logging
def log_set():
    logging.basicConfig(level=logging.DEBUG,format='%(name)s-%(levelno)s-%(levelname)s',filename='log.txt')
def send_email(a):
    mail=yagmail.SMTP(user='3545381542@qq.com',password='olmjqpfedtencjja',host='smtp.qq.com')
    mail.send(to='3545381542@qq.com',subject='测试报告',contents='报告',attachments=a)